package com.gbr.application.model;

import java.awt.Rectangle;

import com.ng.framework.model.DefaultModel;
import com.ng.framework.model.IModel;

public class RecordingArea extends DefaultModel {
    private Rectangle rect;
    
    public RecordingArea(String id) {
        super(id);
        
    }

    protected RecordingArea(IModel m) {
        super(m);
    }

    public Rectangle getRect() {
        return rect;
    }

    public void setRect(Rectangle rect) {
        this.rect = rect;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = super.hashCode();
        result = prime * result + ((rect == null) ? 0 : rect.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (!super.equals(obj))
            return false;
        if (getClass() != obj.getClass())
            return false;
        RecordingArea other = (RecordingArea) obj;
        if (rect == null) {
            if (other.rect != null)
                return false;
        } else if (!rect.equals(other.rect))
            return false;
        return true;
    }

}
